﻿using System;

public class ParamVal
{
    public ParamVal()
    {
    }

    private int _index;
    private int _itemID;
    private int _type;
    private double _param;
    private double _score;
    private int _operator;

    public int Index
    {
        get { return _index; }
        set { _index = value; }
    }

    public int ItemID
    {
        get { return _itemID; }
        set { _itemID = value; }
    }

    public int Type
    {
        get { return _type; }
        set { _type = value; }
    }

    public double Param
    {
        get { return _param; }
        set { _param = value; }
    }

    public double Score
    {
        get { return _score; }
        set { _score = value; }
    }

    public int Operator
    {
        get { return _operator; }
        set { _operator = value; }
    }

    public bool Equals(ParamVal other)
    {
        if (ReferenceEquals(null, other)) return false;
        if (ReferenceEquals(this, other)) return true;
        return other._itemID == _itemID;
    }

    public override bool Equals(object obj)
    {
        if (ReferenceEquals(null, obj)) return false;
        if (ReferenceEquals(this, obj)) return true;
        if (obj.GetType() != typeof (ParamVal)) return false;
        return Equals((ParamVal) obj);
    }

    public override int GetHashCode()
    {
        return _itemID;
    }
}